import AntVLz from '@/components/AntVLz'
import AntVTree from '@/components/AntVTree'
import Magnifying from '@/components/Magnifying'

export const Components = {
  AntVLz,
  AntVTree,
  Magnifying,
}
export const buttonConfig = [
  {
    label: 'AntV-练习',
    id: 'AntVLz',
  },
  {
    label: 'AntV-three',
    id: 'AntVTree',
  },
  {
    label: '放大镜',
    id: 'Magnifying',
  },
]

export const stepsConfig = [
  {
    id: 1,
    title: 'one',
    description: '我是第一个任务',
  },
  {
    id: 2,
    title: 'two',
    description: '我是第二个任务',
  },
  {
    id: 3,
    title: 'three',
    description: '我是第三个任务',
  },
]

export const setCurrentDispatch = (state, action) => {
  switch (action) {
    case 'add':
      return state + 1
    case 'minus':
      if (state < 1) {
        return state
      }
      return state - 1
    default:
      break
  }
}
